package com.eascs.web.o2o.web.aging.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

@Entity
@Table(name="o2o_act_role")
public class SysRole implements Serializable{
    private static final long serialVersionUID = 3462696070045583334L;
    
    public static final String ROLE_ADMIN_CODE = "1000";	//超级管理员角色code
    
    public static final String ROLE_DELPROCESS_CODE = "1100";//流程关闭角色code
    
    /** 角色ID */
    @Column(name = "id")
	@Id
    private String id;

    /** 角色名称 */
    @Column(name = "role_name")
    private String roleName;
    
    /** 角色层级 */
    @Column(name = "role_level")
    private String roleLevel;
    
    /** 角色Code */
    @Column(name = "role_code")
    private String roleCode;

    /** 角色描述 */
    @Column(name = "description")
    private String description;
    
    /** 创建人*/
    private String creator;
    
    /** 修改人*/
    private String updator;
    
    /** 创建时间*/
    @Column(name = "create_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createTime;
    
    /** 修改时间*/
    @Column(name = "update_time")
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateTime;
    
    /** 角色分类*/
    @Column(name = "role_category")
    private String roleCategory;
    
    /*以下为非数据库字段*/
    @Transient
    private List<SysResources> resources;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getRoleName() {
		return roleName;
	}

	public void setRoleName(String roleName) {
		this.roleName = roleName;
	}
	
	public String getRoleCode() {
		return roleCode;
	}

	public void setRoleCode(String roleCode) {
		this.roleCode = roleCode;
	}

	public String getRoleLevel() {
		return roleLevel;
	}

	public void setRoleLevel(String roleLevel) {
		this.roleLevel = roleLevel;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public String getCreator() {
		return creator;
	}

	public void setCreator(String creator) {
		this.creator = creator;
	}

	public String getUpdator() {
		return updator;
	}

	public void setUpdator(String updator) {
		this.updator = updator;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public Date getUpdateTime() {
		return updateTime;
	}

	public void setUpdateTime(Date updateTime) {
		this.updateTime = updateTime;
	}
	
	public String getRoleCategory() {
		return roleCategory;
	}

	public void setRoleCategory(String roleCategory) {
		this.roleCategory = roleCategory;
	}	

	public List<SysResources> getResources() {
		return resources;
	}

	public void setResources(List<SysResources> resources) {
		this.resources = resources;
	}

    
}